Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make << in comment text parse correctly #326

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

anko
Copy link
Contributor

@anko anko commented Oct 1, 2020

Inside comments two consecutive less-than characters (<<) parsed wrongly as <!, due to what was probably a typo. This fixes that.

Also added regression test.

Fixes #325.

Inside comments two consecutive less-than characters (`<<`) parsed
wrongly as `<!`, due to what was probably a typo.  This fixes that.

Added regression test.

Fixes inikulin#325.
@inikulin inikulin merged commit 9c683e1 into inikulin:master Oct 1, 2020
@inikulin
Copy link
Owner

inikulin commented Oct 1, 2020

@anko thank you!

@anko
Copy link
Contributor Author

anko commented Jan 31, 2021

Could a patch version be published with this fix?

I may be the only person on the planet routinely parsing shell scripts containing << out of HTML comments, but it makes me happy. 😅

anko added a commit to anko/txm that referenced this pull request Nov 24, 2021
Did this myself because I guess hell will freeze over before
anyone releases my merged parse5 bugfix PR.  (╯°□°)╯︵ ┻━┻
inikulin/parse5#326

So shell heredocs will work inside comments now.  Closes #4.

It's nice to get rid of a big dependency too, and to avoid the runtime
cost of doing full HTML parsing when we only needed the comments.  And
now we have line numbers and helpful error messages for unclosed
comments.
jmbpwtw pushed a commit to jmbpwtw/parse5 that referenced this pull request Feb 16, 2023
Inside comments two consecutive less-than characters (`<<`) parsed
wrongly as `<!`, due to what was probably a typo.  This fixes that.

Added regression test.

Fixes inikulin#325.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Inside comments, << is parsed as <!
2 participants